<?php
namespace Chat\Service;

use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\Authentication\Storage\NonPersistent;
use Zend\Authentication\Adapter\Dbtable;


class ChatServiceFactory implements FactoryInterface
{
	const TABLE_NAME = "chat";
	const CHAT_ID = "chat_id";
	const POSTED_ON = "posted_on";
	const USER_ID = "user_id";
	const MESSAGE = "message";
	
	public function createService(ServiceLocatorInterface $serviceLocator)
	{
		$dbAdapter = $serviceLocator->get('Zend\Db\Adapter\Adapter');		
		$service = new ChatService($dbAdapter);			
		return $service;
	}
}